package cn.lgs.com.mobileplayer.http;

import java.io.Serializable;

/**
 * Created by lgs on 2017/12/10.
 * 统一的实体类
 */

public class BaseEntity<T> implements Serializable {

    public int getRet() {
        return ret;
    }

    public void setRet(int ret) {
        this.ret = ret;
    }

    public int getErr_code() {
        return err_code;
    }

    public void setErr_code(int err_code) {
        this.err_code = err_code;
    }

    public String getErr_msg() {
        return err_msg;
    }

    public void setErr_msg(String err_msg) {
        this.err_msg = err_msg;
    }

    private int ret;    //1成功；0失败
    private int err_code;   //错误code
    private String err_msg; //错误msg;
    private T data;     //data就是我们真正需要的数据部分

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "BaseEntity{" +
                "ret=" + ret +
                ", err_code=" + err_code +
                ", err_msg='" + err_msg + '\'' +
                ", data=" + data +
                '}';
    }

}
